import { request } from "../request";

const token = localStorage.getItem("token");

/**
 * 物理删除用户接口返回结构
 */
export interface ForceDeleteUserRes {
    code: number;
    message: string;
    data: string;
    timestamp: Record<string, unknown>;
}

/**
 * 物理删除用户
 * @param id 用户ID
 * @returns 删除结果
 */
export const forceDeleteUserAPI = async (id: number): Promise<ForceDeleteUserRes> => {
    return request(`/api/users/${id}/force`, {
        method: "delete",
        headers: {
            Authorization: `Bearer ${token}`
        }
    });
};